import request from '@/utils/request'

// 质量标准

/**
 * 获取列表
 *
 * @export
 * @param {*} data { qualityType, status }
 * @returns
 */
export function fetchQualityStandardFindPage(data) {
  return request({
    url: '/pc/base/qualityStandard/findPage',
    method: 'post',
    data
  })
}

/**
 * 获取详情
 *
 * @export
 * @param {*} params { id }
 * @returns
 */
export function fetchQualityStandardGet(params) {
  return request({
    url: '/pc/base/qualityStandard/get',
    method: 'get',
    params
  })
}

/**
 * 添加
 *
 * @export
 * @param {*} data { qualityType, serviceType, score, timeLimit, qualityContent, remark, status }
 * @returns
 */
export function fetchQualityStandardAdd(data) {
  return request({
    url: '/pc/base/qualityStandard/add',
    method: 'post',
    data
  })
}

/**
 * 更新
 *
 * @export
 * @param {*} data { qualityType, serviceType, score, timeLimit, qualityContent, remark, status }
 * @returns
 */
export function fetchQualityStandardUpdate(data) {
  return request({
    url: '/pc/base/qualityStandard/update',
    method: 'post',
    data
  })
}

/**
 * 删除
 *
 * @export
 * @param {*} data { id }
 * @returns
 */
export function fetchQualityStandardDelete(params) {
  return request({
    url: '/pc/base/qualityStandard/delete',
    method: 'post',
    params
  })
}

/**
 * 更新状态
 *
 * @export
 * @param {*} params { status, id }
 * @returns
 */
export function fetchQualityStandardStatusUpdate(params) {
  return request({
    url: '/pc/base/qualityStandard/updateStatus',
    method: 'post',
    params
  })
}
